% This script generates Figure A.4 in the online appendix.
% Figure A.4: Employment Share of Rust Belt
%% Load data and model-generated results from benchmark calibration and counterfactual experiments.
clearvars;
BM = load('BM.mat');
Data = readtable('emp_share_mfg.xlsx','Range','A1:B35');
nRBgoods = BM.nRBgoods;
year = 1950:1:2000;
% Calculate time series:
Emp_share_RB_t.BM = 100.*shiftdim(sum(BM.l_t(1:2,1:nRBgoods,:),[1 2]));
%% Figure A.4: Employment Share of Rust Belt
figure(104)
% Counterfactual experiment where Rest-of-Country unions are GRADUALLY
% becoming more powerful.
phiS_half_slow = load('CF_phiS_half_slow.mat');
Emp_share_RB_t.phiS_half_slow = 100.*shiftdim(sum(phiS_half_slow.l_t(1:2,1:nRBgoods,:),[1 2]));
figure(104)
plot(Data.year,Data.rbshare.*100,LineStyle=':',LineWidth = 1,Color=.65.*ones(1,3));
text(1985,36,'Data',FontSize=13,Color=.65.*ones(1,3));
hold on
plot(year,Emp_share_RB_t.BM,LineStyle='--',LineWidth = 1,Color=.65.*ones(1,3));
text(1985,40.5,'Model (Benchmark)',FontSize=13,Color=.65.*ones(1,3));
hold on
plot(year,Emp_share_RB_t.phiS_half_slow,LineStyle='-',LineWidth = 2,Color='k');
text(1975,47,sprintf('Bargaining power in ROC converges \nto half of RB level in 2000'),FontSize=13);
xlim([1949 2001]);
xticks(1950:10:2000);
ylim([29 56]);
yticks(30:5:55);
set(gca,'box','off','TickDir','out','FontSize',14);
xline(2001,'k');
yline(56,'k');
ylabel('Rust Belt Employment Share','FontSize',14);
grid on
hold off
%% Save Figure A.4 in PDF and EPS file formats.
saveas(gcf,'figA-4.pdf');
saveas(gcf,'figA-4','epsc');